home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Development Tools & Languages / Eenie / UEenie.h < prev    next >
Encoding:
Text File  |  1994-11-14  |  4.3 KB  |  198 lines  |  [TEXT/MPS ]

  1. // UEenie.h -----------------------------------------------------------------
  2. // Copyright © 1991 by Apple Computer, Inc. All rights reserved.
  3.  
  4. // INCLUDE FILES --------------------------------------------------------------
  5.  
  6. #include "IncludeFiles.h";
  7.  
  8.  
  9. //FORWARD DECLARATIONS --------------------------------------------------------
  10.  
  11. class TEenieView;
  12. class TEenieView1; class TEenieView2; class TEenieView3; class TEenieView4;
  13.  
  14.  
  15. // GLOBALS --------------------------------------------------------------------
  16.  
  17. CRGBColor gDKGray(18000, 22000, 25000);        // dark gray adorner color
  18. CRGBColor gDKPink(0xF8FF, 0x2666, 0xFFFF);     // dark pink hilite color
  19.  
  20.  
  21. // CLASS DEFINITIONS-----------------------------------------------------------
  22.  
  23. // TApplication ---------------------------------------------------------------
  24.  
  25. DeclareClassDesc(TAdornerApplication);
  26.  
  27. class TAdornerApplication : public TApplication {
  28.  
  29.     DeclareClass(TAdornerApplication);
  30.  
  31. public:
  32. //    METHODS
  33.     virtual      void         IAdornerApplication(OSType fileType, OSType creator);
  34.     virtual      TDocument*     DoMakeDocument(CommandNumber, TFile*);
  35. };
  36.  
  37.  
  38. // TDocuments -----------------------------------------------------------------
  39.  
  40. DeclareClassDesc(TAdornerDocument);
  41.  
  42. class TAdornerDocument : public TDocument {
  43.  
  44.     DeclareClass(TAdornerDocument);
  45.  
  46. public:
  47. //    METHODS
  48.     virtual      void        IAdornerDocument();        // init Adorner doucument (if any)
  49.     virtual      void     DoMakeViews(Boolean /*forPrinting*/);
  50. };
  51.  
  52.  
  53. // TEenieView ----------------------------------------------------------------
  54.  
  55. DeclareClassDesc(TEenieView);
  56.  
  57. class TEenieView  : public TView{
  58.  
  59.     DeclareClass(TEenieView);
  60.  
  61. public:
  62. //     TYPEDEFS AND ENUMS
  63.     enum   eViewChange {eVIEW1=700, eVIEW2, eVIEW3, eVIEW4};
  64.     
  65. //    METHODS
  66.     TEenieView();
  67.     virtual      void        DoPostCreate(TDocument* itsDocument);
  68.     virtual      void     Hilite();
  69.     
  70. //    FIELDS
  71.     long                    fCounter;
  72. };
  73.  
  74.  
  75. DeclareClassDesc(TEenieView1);
  76.  
  77. class TEenieView1 : public TEenieView {
  78.  
  79.     DeclareClass(TEenieView1);
  80.  
  81. public:
  82. //    METHODS
  83.     virtual      void    Draw(const VRect& area);
  84.     virtual      void     DrawNumber();
  85.     virtual      void    DoMouseCommand(    VPoint& theMouse,
  86.                                           TToolboxEvent* event,
  87.                                           CPoint hysteresis);
  88.  
  89.     virtual      void     DoUpdate(ChangeID theChange,
  90.                                     TObject* changedObject,
  91.                                     TObject* changedBy,
  92.                                     TDependencySpace* dependencySpace);
  93. };
  94.  
  95.  
  96. DeclareClassDesc(TEenieView2);
  97.  
  98. class TEenieView2 : public TEenieView {
  99.  
  100.     DeclareClass(TEenieView2);
  101.  
  102. public:
  103. //    METHODS
  104.     virtual      void    Draw(const VRect& area);
  105.     virtual      void     DrawNumber();
  106.     virtual      void    DoMouseCommand(    VPoint& theMouse,
  107.                                           TToolboxEvent* event,
  108.                                           CPoint hysteresis);
  109.     virtual      void     DoUpdate(ChangeID theChange,
  110.                                     TObject* changedObject,
  111.                                     TObject* changedBy,
  112.                                     TDependencySpace* dependencySpace);
  113. };
  114.  
  115.  
  116. DeclareClassDesc(TEenieView3);
  117.  
  118. class TEenieView3 : public TEenieView {
  119.  
  120.     DeclareClass(TEenieView3);
  121.  
  122. public:
  123. //    METHODS
  124.     virtual      void    Draw(const VRect& area);
  125.     virtual      void     DrawNumber();
  126.     virtual      void    DoMouseCommand(    VPoint& theMouse,
  127.                                           TToolboxEvent* event,
  128.                                           CPoint hysteresis);
  129.     virtual      void     DoUpdate(ChangeID theChange,
  130.                                     TObject* changedObject,
  131.                                     TObject* changedBy,
  132.                                     TDependencySpace* dependencySpace);
  133. };
  134.  
  135.  
  136. DeclareClassDesc(TEenieView4);
  137.  
  138. class TEenieView4 : public TEenieView {
  139.  
  140.     DeclareClass(TEenieView4);
  141.  
  142. public:
  143. //    METHODS
  144.     virtual      void    Draw(const VRect& area);
  145.     virtual      void     DrawNumber();
  146.     virtual      void    DoMouseCommand(    VPoint& theMouse,
  147.                                           TToolboxEvent* event,
  148.                                           CPoint hysteresis);
  149.     virtual      void     DoUpdate(ChangeID theChange,
  150.                                     TObject* changedObject,
  151.                                     TObject* changedBy,
  152.                                     TDependencySpace* dependencySpace);
  153. };
  154.  
  155.  
  156. // ADORNERS ------------------------------------------------------------------
  157.  
  158. DeclareClassDesc(TGrayFill);
  159.  
  160. class TGrayFill : public TAdorner {
  161.  
  162.     DeclareClass(TGrayFill);
  163.  
  164. public:
  165. //    METHODS
  166.     virtual      void Draw(TView*    itsView, const VRect& /*area*/); 
  167. };
  168.  
  169.  
  170. DeclareClassDesc(TOtherGrayFill);
  171.  
  172. class TOtherGrayFill : public TAdorner {
  173.  
  174.     DeclareClass(TOtherGrayFill);
  175.  
  176. public:
  177. //    METHODS
  178.     virtual      void Draw(TView*    itsView, const VRect& /*area*/); 
  179. };
  180.  
  181.  
  182. DeclareClassDesc(TEtchedFrame);
  183.  
  184. class TEtchedFrame : public TAdorner {
  185.  
  186.     DeclareClass(TEtchedFrame);
  187.  
  188. public:
  189. //    METHODS
  190.     TEtchedFrame();    
  191.     virtual      void Draw(TView*    itsView, const VRect& /*area*/);
  192.  
  193. //    FIELDS
  194.     Point                 fInset;
  195. };
  196.  
  197.  
  198.